#pragma once
#include <opencv2/opencv.hpp>
#include <chrono>
#include <iomanip>
#include <iostream>
#include <ostream>
#include <vector>
#include <queue>
#include <map>
#include <cstring>
#include <fstream>
#include <numeric>
#include <algorithm>

#include "rkmodel_error_code.h"
#include "rkmodel_struct.h"
#include "model_manager.h"
#include "common/base_struct.h"

class LogInfo;

namespace ai {

// namespace en;

class ModelConfig;
// class HBClsPredictor;
// class HBOCRRecognizer;
// class HBOCRDetector;
class RKPredictor;
class RKDetPredictor;
class RKOcrDetPredictor;
class RKOcrRecPredictor;
// class HBSegPredictor;
// class HBOCRPostProcessor;
class RKScrfdPredictor;
class RKFacefeaturePredictor;

class RKModelManager: public ai::ModelManager
{
public:
  RKModelManager(LogInfo *log_info);
  ~RKModelManager();

  int init_model_imp(std::string model_path, std::string cfg_path, int gpu_idx, ai::InitModelData &imd, BasePredictor** infer, int debug_mode);

  int free_model(int md_idx);

private:
  int load_model(std::string model_path, RKPackPredictor* rkp, std::string model_id);


private:
  // friend class ClsPredictor;
  // friend class OCRRecognizer;
  // friend class OCRDetector;
  friend class RKDetPredictor;
  // friend class SegPredictor;





  

};

} // namespace hb
